﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script src="js/jquery.js" type="text/javascript"></script>
    <script src="js/jquery.mobile-1.4.2.min.js" type="text/javascript"></script>
    <link href="css/themes/default/jquery.mobile-1.4.2.min.css" rel="stylesheet" type="text/css" />
    <link href="style/login.css" rel="stylesheet" type="text/css" />
    <script src="javescript/login.js" type="text/javascript"></script>
</head>
<script type="text/javascript">
   
</script>
<body>
    <section id="page1" data-role="page" class="page"> 
      <header data-role="header" data-theme="b"><h1>开始系统</h1></header>
     <div data-role="content"   class="content"> 
        <form method="post" id="loginform">
        <input type="text" name="username" id="username"   placeholder="用户" data-clear-btn="true"/>
        <input type="password" name="password" id="password"    placeholder="密码" data-clear-btn="true" />
        <fieldset data-role="controlgroup">
            <input type="checkbox" name="checkbox-1" id="checkbox-1" class="custom" />
            <label for="checkbox-1">
                保持登录状态</label>
        </fieldset>
          <a href="userManagement.html" data-role="button" id="A1" data-theme="e">Test</a> 
             <a data-role="button" href="register.html"  data-theme="b">注册用户</a>
        <a data-role="button" id="btnLogin" data-theme="b">登录</a>
         <a data-role="button" href="sqllitedb.html" id="A2" data-theme="b">验证数据库</a>
          <a data-role="button" href="SingllBillManagement.html" id="A5" data-theme="b">记账管理</a>
           <a data-role="button" href="OnLoadUI.html"  id="A3" data-theme="b">OnLoadUI</a>
            <a data-role="button"  id="A4" data-theme="b">清空数据库</a>
              <script type="text/javascript">
                  $("#A4").click(function () {
                      alert("准备清空数据库001,开始清空数据。。。。。");
                      var db = window.openDatabase("SugarDB", "1.0", "SugarDB", 5000000);
                      db.transaction(queryDB, errorCB, successCB);
                  });
                  // 查询数据库
                  function queryDB(tx) {
                      //删除表 
                      var dropDataTable = "DROP TABLE IF EXISTS  LoginInfo";
                      tx.executeSql(dropDataTable);
                  }
                  function errorCB(err) {
                      console.log("错误信息：" + err.message);
                      alert("错误信息：" + err.message);

                  }
                  // 事务执行成功后调用的回调函数
                  function successCB() {
                      alert("清空数据成功！");
                  }
        </script>
        </form>
    </div> 
       <footer data-role="footer" data-position="fixed"><h1>纯粹是糖【353328333】</h1></footer>
    </section>
</body>
</html>
